package javaCode;

public class LeetCode283 {
	public void moveZeroes(int[] nums) {
		int i = 0,j = 0;
	      for( i =0,j = 0;j < nums.length;j++){
	    	while(j < nums.length && nums[j] == 0){
	    		j++;
	    		continue;
	    	}
	    	if(j < nums.length){
	    		nums[i] = nums[j];
	    		i++;

	    	}
	    	
	      }
	      while(i < nums.length){
	    	  nums[i++] = 0;
	    	  
	      }
	    }
}
